﻿using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;

using System;
using System.Collections.Generic;
using System.Linq;

using NUnit.Framework;
using Nemerle2.Compiler;

namespace Test
{
  /// <summary>
  /// Description of EventTests.
  /// </summary>
  [TestFixture]
  public class EventTests : AssemblyTests
  {
    [Test]
    public Test() : void
    {
      def ty = CommonProject.LoadedAssemblies.First().TopLevelTypes.Where(t => t.Name == typeof(TestAssembly.AbstractClass).Name).First();
      def ev = ty.GetMembers().Where(m => m.MemberKind == MemberKind.Event && m.Name == "AbstractEvent").Cast.[IEventInfo]().First();
      Assert.IsTrue(ev.IsAbstract);
    }
  }
}
